{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"component\", \"components\", \"componentsProps\", \"disabled\", \"value\", \"label\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport composeClasses from '../composeClasses';\nimport { SelectUnstyledContext } from '../SelectUnstyled/SelectUnstyledContext';\nimport { getOptionUnstyledUtilityClass } from './optionUnstyledClasses';\nimport { useSlotProps } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUtilityClasses(ownerState) {\n  var disabled = ownerState.disabled,\n    highlighted = ownerState.highlighted,\n    selected = ownerState.selected;\n  var slots = {\n    root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n  };\n  return composeClasses(slots, getOptionUnstyledUtilityClass, {});\n}\n/**\n * An unstyled option to be used within a SelectUnstyled.\n */\n\nvar OptionUnstyled = /*#__PURE__*/React.forwardRef(function OptionUnstyled(props, ref) {\n  var children = props.children,\n    component = props.component,\n    _props$components = props.components,\n    components = _props$components === void 0 ? {} : _props$components,\n    _props$componentsProp = props.componentsProps,\n    componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,\n    disabled = props.disabled,\n    value = props.value,\n    label = props.label,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  var selectContext = React.useContext(SelectUnstyledContext);\n  if (!selectContext) {\n    throw new Error('OptionUnstyled must be used within a SelectUnstyled');\n  }\n  var Root = component || components.Root || 'li';\n  var selectOption = {\n    value: value,\n    label: label || children,\n    disabled: disabled\n  };\n  var optionState = selectContext.getOptionState(selectOption);\n  var optionProps = selectContext.getOptionProps(selectOption);\n  var listboxRef = selectContext.listboxRef;\n  var ownerState = _extends({}, props, optionState);\n  var optionRef = React.useRef(null);\n  var handleRef = useForkRef(ref, optionRef);\n  React.useEffect(function () {\n    // Scroll to the currently highlighted option\n    if (optionState.highlighted) {\n      if (!listboxRef.current || !optionRef.current) {\n        return;\n      }\n      var listboxClientRect = listboxRef.current.getBoundingClientRect();\n      var optionClientRect = optionRef.current.getBoundingClientRect();\n      if (optionClientRect.top < listboxClientRect.top) {\n        listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n      } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n        listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n      }\n    }\n  }, [optionState.highlighted, listboxRef]);\n  var classes = useUtilityClasses(ownerState);\n  var rootProps = useSlotProps({\n    elementType: Root,\n    externalSlotProps: componentsProps.root,\n    externalForwardedProps: other,\n    additionalProps: _extends({}, optionProps, {\n      ref: handleRef\n    }),\n    className: classes.root,\n    ownerState: ownerState\n  });\n  return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n    children: children\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OptionUnstyled.propTypes\n/* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit TypeScript types and run \"yarn proptypes\"  |\n  // ----------------------------------------------------------------------\n\n  /**\n   * @ignore\n   */\n  children: PropTypes.node,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * The components used for each slot inside the OptionUnstyled.\n   * Either a string to use a HTML element or a component.\n   * @default {}\n   */\n  components: PropTypes.shape({\n    Root: PropTypes.elementType\n  }),\n  /**\n   * The props used for each slot inside the OptionUnstyled.\n   * @default {}\n   */\n  componentsProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * If `true`, the option will be disabled.\n   * @default false\n   */\n  disabled: PropTypes.bool,\n  /**\n   * A text representation of the option's content.\n   * Used for keyboard text navigation matching.\n   */\n  label: PropTypes.string,\n  /**\n   * The value of the option.\n   */\n  value: PropTypes.any.isRequired\n} : void 0;\n/**\n * An unstyled option to be used within a SelectUnstyled.\n *\n * Demos:\n *\n * - [Unstyled Select](https://mui.com/base/react-select/)\n *\n * API:\n *\n * - [OptionUnstyled API](https://mui.com/base/api/option-unstyled/)\n */\n\nexport default /*#__PURE__*/React.memo(OptionUnstyled);","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","unstable_useForkRef","useForkRef","composeClasses","SelectUnstyledContext","getOptionUnstyledUtilityClass","useSlotProps","jsx","_jsx","useUtilityClasses","ownerState","disabled","highlighted","selected","slots","root","OptionUnstyled","forwardRef","props","ref","children","component","components","componentsProps","value","label","other","selectContext","useContext","Error","Root","selectOption","optionState","getOptionState","optionProps","getOptionProps","listboxRef","optionRef","useRef","handleRef","useEffect","current","listboxClientRect","getBoundingClientRect","optionClientRect","top","scrollTop","bottom","classes","rootProps","elementType","externalSlotProps","externalForwardedProps","additionalProps","className","process","env","NODE_ENV","propTypes","node","shape","oneOfType","func","object","bool","string","any","isRequired","memo"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/OptionUnstyled/OptionUnstyled.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"component\", \"components\", \"componentsProps\", \"disabled\", \"value\", \"label\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport composeClasses from '../composeClasses';\nimport { SelectUnstyledContext } from '../SelectUnstyled/SelectUnstyledContext';\nimport { getOptionUnstyledUtilityClass } from './optionUnstyledClasses';\nimport { useSlotProps } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nfunction useUtilityClasses(ownerState) {\n  const {\n    disabled,\n    highlighted,\n    selected\n  } = ownerState;\n  const slots = {\n    root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n  };\n  return composeClasses(slots, getOptionUnstyledUtilityClass, {});\n}\n/**\n * An unstyled option to be used within a SelectUnstyled.\n */\n\n\nconst OptionUnstyled = /*#__PURE__*/React.forwardRef(function OptionUnstyled(props, ref) {\n  const {\n    children,\n    component,\n    components = {},\n    componentsProps = {},\n    disabled,\n    value,\n    label\n  } = props,\n        other = _objectWithoutPropertiesLoose(props, _excluded);\n\n  const selectContext = React.useContext(SelectUnstyledContext);\n\n  if (!selectContext) {\n    throw new Error('OptionUnstyled must be used within a SelectUnstyled');\n  }\n\n  const Root = component || components.Root || 'li';\n  const selectOption = {\n    value,\n    label: label || children,\n    disabled\n  };\n  const optionState = selectContext.getOptionState(selectOption);\n  const optionProps = selectContext.getOptionProps(selectOption);\n  const listboxRef = selectContext.listboxRef;\n\n  const ownerState = _extends({}, props, optionState);\n\n  const optionRef = React.useRef(null);\n  const handleRef = useForkRef(ref, optionRef);\n  React.useEffect(() => {\n    // Scroll to the currently highlighted option\n    if (optionState.highlighted) {\n      if (!listboxRef.current || !optionRef.current) {\n        return;\n      }\n\n      const listboxClientRect = listboxRef.current.getBoundingClientRect();\n      const optionClientRect = optionRef.current.getBoundingClientRect();\n\n      if (optionClientRect.top < listboxClientRect.top) {\n        listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n      } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n        listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n      }\n    }\n  }, [optionState.highlighted, listboxRef]);\n  const classes = useUtilityClasses(ownerState);\n  const rootProps = useSlotProps({\n    elementType: Root,\n    externalSlotProps: componentsProps.root,\n    externalForwardedProps: other,\n    additionalProps: _extends({}, optionProps, {\n      ref: handleRef\n    }),\n    className: classes.root,\n    ownerState\n  });\n  return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n    children: children\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? OptionUnstyled.propTypes\n/* remove-proptypes */\n= {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit TypeScript types and run \"yarn proptypes\"  |\n  // ----------------------------------------------------------------------\n\n  /**\n   * @ignore\n   */\n  children: PropTypes.node,\n\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n\n  /**\n   * The components used for each slot inside the OptionUnstyled.\n   * Either a string to use a HTML element or a component.\n   * @default {}\n   */\n  components: PropTypes.shape({\n    Root: PropTypes.elementType\n  }),\n\n  /**\n   * The props used for each slot inside the OptionUnstyled.\n   * @default {}\n   */\n  componentsProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n\n  /**\n   * If `true`, the option will be disabled.\n   * @default false\n   */\n  disabled: PropTypes.bool,\n\n  /**\n   * A text representation of the option's content.\n   * Used for keyboard text navigation matching.\n   */\n  label: PropTypes.string,\n\n  /**\n   * The value of the option.\n   */\n  value: PropTypes.any.isRequired\n} : void 0;\n/**\n * An unstyled option to be used within a SelectUnstyled.\n *\n * Demos:\n *\n * - [Unstyled Select](https://mui.com/base/react-select/)\n *\n * API:\n *\n * - [OptionUnstyled API](https://mui.com/base/api/option-unstyled/)\n */\n\nexport default /*#__PURE__*/React.memo(OptionUnstyled);"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,IAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC;AAC1G,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,mBAAmB,IAAIC,UAAU,QAAQ,YAAY;AAC9D,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC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